﻿<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="/WEB-INF/struts-html" prefix="html"%>
<%@ taglib uri="/WEB-INF/struts-bean" prefix="bean"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="sx" uri="/struts-dojo-tags"%>
<%request.setAttribute("ctx",request.getContextPath()); %>
<html>
<head>
<link href="${ctx}/extend/css/style.css" rel="stylesheet"
	type="text/css" />
<script src="${ctx}/extend/js/jquery/jquery.js" type="text/javascript"></script>
<script src="${ctx}/extend/js/dutil/DUtil.js" type="text/javascript"></script>
<script src="${ctx}/extend/css/css.js" type="text/javascript"></script>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link href="${ctx}/css/style.css" rel="stylesheet" type="text/css" />
<script src="${ctx}/js/common.js" type="text/javascript"></script>
<s:head theme="xhtml" />
<sx:head parseContent="true" />
<title>Item View</title>
<script type="text/javascript">
   function uploadMd(){
   		document.getElementById("uploadBtn").disabled = true;
       	window.location.href="${ctx}/admin/uploadMd?id=${mdVO.id}";
    }
   function stopUpload(){
       	window.location.href="${ctx}/admin/stopUpload?id=${mdVO.id}";
   }
   function updateMd(){
       	window.location.href="${ctx}/admin/toEditMd?id=${mdVO.id}";
    }
</script>
</head>


<body class="maintable">
	<div id="div_all_document"
		style="height: 100%; overflow-y: auto; position: relative; word-wrap: break-word; word-break: break-all;">
		<div class="dclass_container">
			<div class="dclass_container_header">
				<div class="dclass_container_title">View Item</div>
			</div>

			<div class="dclass_container_content">
				<table width="100%" border="0" cellpadding="0" cellspacing="1"
					bgcolor="#9FD6FF">
					<tr>
						<td width="20%" class="formtitle">itemId:<span
							class="fontred">*</span><br /></td>
						<td width="30%" class="formtd">${mdVO.id}</td>
						<td width="20%" class="formtitle">Title:<span class="fontred">*</span></td>
						<td width="30%" class="formtd">${mdVO.title}</td>
					</tr>
					<tr>
						<td width="20%" class="formtitle">Listed By:<span
							class="fontred">*</span><br /></td>
						<td width="30%" class="formtd">${mdVO.ebayAccount }</td>
						<td width="20%" class="formtitle">Start Price:<span
							class="fontred">*</span></td>
						<td width="30%" class="formtd"><s:property
								value="mdVO.startPrice.CurrencyID" />&nbsp; <s:property
								value="mdVO.startPrice.Value" /></td>
					</tr>
					<tr>
						<td width="20%" class="formtitle">Quantity:<span
							class="fontred">*</span><br /></td>
						<td width="30%" class="formtd">${mdVO.quantity }</td>
						<td width="20%" class="formtitle">Listing Duration:<span
							class="fontred">*</span></td>
						<td width="30%" class="formtd">${mdVO.dayListing}</td>
					</tr>
					<tr>
						<td width="20%" class="formtitle">Site:<span class="fontred">*</span><br /></td>
						<td width="30%" class="formtd">${mdVO.site}</td>
						<td width="20%" class="formtitle">Listing Type:<span
							class="fontred">*</span></td>
						<td width="30%" class="formtd">${mdVO.listingType}</td>
					</tr>
					<tr>
						<td width="20%" class="formtitle">Sub Title:<span
							class="fontred">*</span><br /></td>
						<td width="30%" class="formtd">${mdVO.subTitle}</td>
						<td width="20%" class="formtitle">Location:<span
							class="fontred">*</span></td>
						<td width="30%" class="formtd">${mdVO.location}</td>
					</tr>
					<tr>
						<td width="20%" class="formtitle">Description:<span
							class="fontred">*</span><br /></td>
						<td colspan="3" width="30%" class="formtd">${mdVO.description}
						</td>
					</tr>

					<tr>
						<td class="formtitle">Payment:</td>
						<td colspan="3" class="formtd">${mdVO.paymentMethodList}<br />
							PayPal E-Mail:${mdVO.payPalEmailAddress}
						</td>
					</tr>
					<tr>
						<td class="formtitle">Category:</td>
						<td colspan="3" class="formtd">${mdVO.categoryName}</td>
					</tr>
					<tr>
						<td class="formtitle">Upload Set:</td>
						<td colspan="3" class="formtd">
							interval:&nbsp;${mdVO.uploadPerTime}min,&nbsp;&nbsp; number of
							times:&nbsp;${mdVO.uploadCount},&nbsp;&nbsp; had uploaded
							times:&nbsp;${mdVO.hadUploadCount}&nbsp;&nbsp;</td>
					</tr>
					<tr>
						<td class="formtitle">Shipping:</td>
						<td colspan="3" class="formtd">
							<table width="99%" border="0" cellpadding="0" cellspacing="1"
								bgcolor="#CEDDE3">
								<tr>
									<td class="formtitle">Shipping Service</td>
									<td colspan="3" class="formtd">${mdVO.shippingService}</td>
								</tr>
								<tr>
									<td class="formtitle">Priority</td>
									<td colspan="3" class="formtd">${mdVO.priority}</td>
								</tr>
								<tr>
									<td class="formtitle">Cost</td>
									<td colspan="3" class="formtd"><s:property
											value="mdVO.cost.CurrencyID" />&nbsp; <s:property
											value="mdVO.cost.Value" /></td>
								</tr>
								<tr>
									<td class="formtitle">Additional Cost</td>
									<td colspan="3" class="formtd"><s:property
											value="mdVO.additionalCost.CurrencyID" />&nbsp; <s:property
											value="mdVO.additionalCost.Value" /></td>
								</tr>
							</table>
						</td>
					</tr>
					<c:forEach var="picDetail" items="${mdVO.picList}"
						varStatus="picNo">
						<tr>
							<td class="formtitle">Item Picture ${picNo.count}</td>
							<td colspan="3" class="formtd"><img height="150" id="img2"
								width="200" alt="上传前预览" name="img"
								src="${ctx}/${picDetail.localName}"></td>
						</tr>
					</c:forEach>
				</table>
				<br style="line-height: 5px;" /> <br style="line-height: 5px;" />
				<div style="padding: 0.3em; text-align: center">
					<c:if test="${mdVO.status ==0}">
						<input type="button" id="updateBtn" class="btn1" value="Update"
							onclick="javascript:updateMd();" />&nbsp;
    		<input type="button" id="uploadBtn" class="btn1" value="Upload"
							onclick="javascript:uploadMd();" />&nbsp;
    	</c:if>
					<c:if test="${mdVO.status ==1}">
						<input type="button" id="stopBtn" class="btn1" value="Stop Upload"
							onclick="javascript:stopUpload();" />&nbsp;
    	</c:if>
    				<!-- Removed by Doug@0822 -->
					<!-- <input type="button" class="btn1" value="Close"
						onclick="javascript:window.close();" /> -->
				</div>
			</div>
		</div>
	</div>
</body>
</html>